{include file="public/header" /}
<link rel="stylesheet" href="/static/admin/addons/builder/css/base.css" media="all">
<style>
    .layui-form-item {
        margin-bottom: 15px !important;
        clear: both;
        *zoom: 1;
    }
</style>
<body>
<form class="layui-form" id="form" action="{:url('save')}">
    <div class="layui-fluid layui-anim layui-anim-downbit">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">

                <input type="hidden" name="id" value="{$Request.param.id}">
                <input type="hidden" name="pid" value="{$Request.param.pid|default=0}">
                {include file="public/arguments" /}
                {if $p_title }
                <div class="layui-form-item">
                    <label class="layui-form-label">上级分类</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" value="{$p_title}" disabled="disabled"/>
                    </div>
                </div>
                {/if}
                <div class="layui-form-item">
                    <label class="layui-form-label">分类名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" placeholder="请输入分类名称" lay-verify="required"
                               lay-reqtext="请输入分类名称" lay-verType="tips"
                               class="layui-input" value="{$info?$info.title:''}"/>
                    </div>
                </div>
                {if !$p_title }
                <div class="layui-form-item">
                    <label class="layui-form-label">图标</label>
                    {table:alone view='items/img' info='$info' form='$form'/}
                </div>
                {/if}

                <div class="layui-form-item">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-block">
                        <input type="text" name="sort" autocomplete="off" lay-verify="required" lay-reqtext="请填写排序"
                               lay-verType="tips"
                               placeholder="请输入排序，越小越靠前" class="layui-input"
                               value="{$info?$info.sort:''}">
                    </div>
                </div>


            </div>
        </div>

    </div>
    <div class="layui-footer" style="left: 0;">
        <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存
        </button>

    </div>
</form>
</body>
{include file="public/footer" /}

</html>